import request from '@/utils/request'
import { BASE_URL } from '@/utils/config'

// 获取头像配置
export function getAvatarConfig(userId) {
  return request({
    url: `/user/${userId}/avatar/config`,
    method: 'get'
  })
}

// 保存头像配置
export function saveAvatarConfig(userId, data) {
  return request({
    url: `/user/${userId}/avatar/config`,
    method: 'post',
    data
  })
}

// 上传头像
export function uploadAvatar(userId, data) {
  return request({
    url: `/user/${userId}/avatar/upload`,
    method: 'post',
    headers: {
      'Content-Type': 'multipart/form-data'
    },
    data
  })
} 